package com.tnl.app.entity;

public enum FunctionDict {
	/*
	 * postype
	 * 1- 高级管理
	 * 2- 法务
	 * 3- 人力资源
	 * 4- 咨询/项目
	 * 5- 财务
	 * 6- 信息技术
	 * 7- 业务拓展及招投标
	 * 8- 市场
	 * 9- 销售
	 * 10- 客服中心
	 * 11- 研发
	 * 12- 供给与物流
	 * 13- 质量监督
	 * 14- 医学事务
	 * 15- 临床
	 * 16- 生物技术研发
	 * 17- 药剂
	 * 18- 工厂生产
	 * 19-行政
	 */
	SeniorManagement(1, "高级管理"),
    LawWorks(2,"法务"),
    HumanResources(3,"人力资源"),
	ConsultingProject(4,"咨询/项目"),
	Finance(5,"财务"),
	InformationTechnology(6,"信息技术"),
	BD(7,"业务拓展及招投标"),
	Market(8,"市场"),
	Sales(9,"销售"),
	CustomerServiceCenter(10,"客服中心"),
	Development(11,"研发"),
	SupplyLogistics(12,"供给与物流"),
	QualitySupervision(13,"质量监督"),
	MedicalAffairs(14,"医学事务"),
	Clinical(15,"临床"),
	Biotechnology(16,"生物技术研发"),
	Medicament(17,"药剂"),
	FactoryProduction(18,"工厂生产"),
	Administration(19,"行政");
	
	public Integer id;
    public String desc;
    
    FunctionDict(Integer id, String desc) {
        this.id = id;
        this.desc = desc;
    }
    
    public static FunctionDict findById(Integer id) {
    	FunctionDict dict;
        switch(id) {
        case 1:
            dict = FunctionDict.SeniorManagement;
            break;
        case 2:
            dict = FunctionDict.LawWorks;
            break;
        case 3:
            dict = FunctionDict.HumanResources;
            break;
        case 4:
            dict = FunctionDict.ConsultingProject;
            break; 
        case 5:
            dict = FunctionDict.Finance;
            break;   
        case 6:
            dict = FunctionDict.InformationTechnology;
            break; 
        case 7:
            dict = FunctionDict.BD;
            break;   
        case 8:
            dict = FunctionDict.Market;
            break; 
        case 9:
            dict = FunctionDict.Sales;
            break;     
        case 10:
            dict = FunctionDict.CustomerServiceCenter;
            break;   
        case 11:
            dict = FunctionDict.Development;
            break; 
        case 12:
            dict = FunctionDict.SupplyLogistics;
            break;
        case 13:
            dict = FunctionDict.QualitySupervision;
            break; 
        case 14:
            dict = FunctionDict.MedicalAffairs;
            break; 
        case 15:
            dict = FunctionDict.Clinical;
            break; 
        case 16:
            dict = FunctionDict.Biotechnology;
            break; 
        case 17:
            dict = FunctionDict.Medicament;
            break; 
        case 18:
            dict = FunctionDict.FactoryProduction;
            break; 
        case 19:
            dict = FunctionDict.Administration;
            break; 
        default:
            throw new IllegalArgumentException("非法ID");
        }
        return dict;
    }
    public String getDesc() {
        return desc;
    }
    
    public static void main(String[] args) {
        String desc = FunctionDict.findById(1).getDesc();
        System.out.println(desc);
    }
}
